//
//  EYProperty.m
//  metadata
//
//  Created by easy on 11-5-27.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "EYProperty.h"


@implementation EYProperty
@synthesize ownProperty = own;
@synthesize name;
@synthesize attributes;

+(id) init:(objc_property_t)prop {
	return [[[self alloc] initWith:prop] autorelease];
}
-(id) initWith:(objc_property_t) prop  {
	if (self = [super init]) {
		own = prop; 
	}
	return  self;
}


#pragma mark -
#pragma mark setter/getter
-(NSString *) name{
	return [NSString stringWithCString:property_getName(self.ownProperty) encoding:DEFAULT_ENCODING];
}
-(NSString *) attributes{
	return [NSString stringWithCString:property_getAttributes(self.ownProperty) encoding:DEFAULT_ENCODING];
}

-(void) dealloc{ 
	own = nil;
	[super dealloc];
}
@end
